<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LogDevice API: facebook::logdevice::ConfigSubscriptionHandle Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LogDevice API
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefacebook.html">facebook</a></li><li class="navelem"><b>logdevice</b></li><li class="navelem"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classfacebook_1_1logdevice_1_1_config_subscription_handle-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">facebook::logdevice::ConfigSubscriptionHandle Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_config_subscription_handle_8h_source.html">ConfigSubscriptionHandle.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a14b7d0e00c3e41c226cbc4974f476977"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a14b7d0e00c3e41c226cbc4974f476977">ConfigSubscriptionHandle</a> () noexcept=default</td></tr>
<tr class="separator:a14b7d0e00c3e41c226cbc4974f476977"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe85eab7d29553114698886383af6e06"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#abe85eab7d29553114698886383af6e06">ConfigSubscriptionHandle</a> (configuration::UpdateableConfigBase *owner, configuration::subscription_id_t sub_id) noexcept</td></tr>
<tr class="separator:abe85eab7d29553114698886383af6e06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1973ec9cd0a992d20cd11022c6ff907"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#ac1973ec9cd0a992d20cd11022c6ff907">~ConfigSubscriptionHandle</a> () noexcept</td></tr>
<tr class="separator:ac1973ec9cd0a992d20cd11022c6ff907"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98f909273d9315e4731d362f45f2764c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a98f909273d9315e4731d362f45f2764c">ConfigSubscriptionHandle</a> (<a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a> &amp;&amp;other) noexcept</td></tr>
<tr class="separator:a98f909273d9315e4731d362f45f2764c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90f35b31afc668e2ee0a359ce9dd87b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a90f35b31afc668e2ee0a359ce9dd87b2">operator=</a> (<a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a> &amp;&amp;other) noexcept</td></tr>
<tr class="separator:a90f35b31afc668e2ee0a359ce9dd87b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a284e3162835932f6f808be9d219465ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#a284e3162835932f6f808be9d219465ea">unsubscribe</a> () noexcept</td></tr>
<tr class="separator:a284e3162835932f6f808be9d219465ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa24da62aabbff915c6c4c21bb049339c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html#aa24da62aabbff915c6c4c21bb049339c">swap</a> (<a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a> &amp;other) noexcept</td></tr>
<tr class="separator:aa24da62aabbff915c6c4c21bb049339c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An interface for the handle for client-side subscriptions to config updates. Contains no usable methods. Automatically unsubscribes itself on destruction (RAII).</p>
<p>Can be moved but not copied. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a14b7d0e00c3e41c226cbc4974f476977"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14b7d0e00c3e41c226cbc4974f476977">&#9670;&nbsp;</a></span>ConfigSubscriptionHandle() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">facebook::logdevice::ConfigSubscriptionHandle::ConfigSubscriptionHandle </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Default constructor. Creates a subscription handle without owner. Useful for move-assignment at a later point. </p>

</div>
</div>
<a id="abe85eab7d29553114698886383af6e06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe85eab7d29553114698886383af6e06">&#9670;&nbsp;</a></span>ConfigSubscriptionHandle() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">facebook::logdevice::ConfigSubscriptionHandle::ConfigSubscriptionHandle </td>
          <td>(</td>
          <td class="paramtype">configuration::UpdateableConfigBase *&#160;</td>
          <td class="paramname"><em>owner</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">configuration::subscription_id_t&#160;</td>
          <td class="paramname"><em>sub_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor for a valid subscription handle.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">owner</td><td>Configuration from where to unsubscribe at destruction. </td></tr>
    <tr><td class="paramname">sub_id</td><td>The internal subscription ID generated from UpdateableConfig </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac1973ec9cd0a992d20cd11022c6ff907"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1973ec9cd0a992d20cd11022c6ff907">&#9670;&nbsp;</a></span>~ConfigSubscriptionHandle()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">facebook::logdevice::ConfigSubscriptionHandle::~ConfigSubscriptionHandle </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Destructor. Unsubscribes from owner, if any. If callback is running now, blocks until the callback returns. </p>

</div>
</div>
<a id="a98f909273d9315e4731d362f45f2764c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98f909273d9315e4731d362f45f2764c">&#9670;&nbsp;</a></span>ConfigSubscriptionHandle() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">facebook::logdevice::ConfigSubscriptionHandle::ConfigSubscriptionHandle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Move constructor. Releases other. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a90f35b31afc668e2ee0a359ce9dd87b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90f35b31afc668e2ee0a359ce9dd87b2">&#9670;&nbsp;</a></span>operator=()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a>&amp; facebook::logdevice::ConfigSubscriptionHandle::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Move-assignment operator. Unsubscribes this and releases other. </p>

</div>
</div>
<a id="aa24da62aabbff915c6c4c21bb049339c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa24da62aabbff915c6c4c21bb049339c">&#9670;&nbsp;</a></span>swap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void facebook::logdevice::ConfigSubscriptionHandle::swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classfacebook_1_1logdevice_1_1_config_subscription_handle.html">ConfigSubscriptionHandle</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Swap two subscription handles. </p>

</div>
</div>
<a id="a284e3162835932f6f808be9d219465ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a284e3162835932f6f808be9d219465ea">&#9670;&nbsp;</a></span>unsubscribe()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void facebook::logdevice::ConfigSubscriptionHandle::unsubscribe </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Unsubscribe now. Useful if one wants to unsubscribe before or without destroying the handle. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/Users/chunma/fbsource/fbcode/logdevice/include/<a class="el" href="_config_subscription_handle_8h_source.html">ConfigSubscriptionHandle.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<hr class="footer"/><address class="footer">
<small>
LogDevic API v2.35
</small>
</address>
</body>
</html>
